package cn.jingyuan.owl.model.entity;

import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

@ToString
public abstract class AbstractEntity<E, ID> implements EmptyEntity, Serializable {

    /** 主键 */
    protected ID id;

    /** 更新时间 */
    protected Date updateTime;

    /** 创建时间 */
    protected Date createTime;

    public ID getId() {
        return id;
    }

    public E setId(ID id) {
        this.id = id;

        return (E) this;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public E setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;

        return (E) this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public E setCreateTime(Date createTime) {
        this.createTime = createTime;

        return (E) this;
    }

}
